<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"  %>

<html>
<head>
	<!-- JQuery Plug-in -->
	<script src="/scripts/jquery-ui/external/jquery.bgiframe-2.1.2.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.core.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.widget.js"></script>	
	<script src="/scripts/jquery-ui/ui/jquery.ui.tabs.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.button.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.datepicker.js"></script>
	<script src="/scripts/jquery-ui/ui/i18n/jquery.ui.datepicker-ko.js"></script>	
	<script src="/scripts/jquery-ui/ui/jquery.ui.mouse.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.draggable.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.position.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.resizable.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.ui.dialog.js"></script>
	<script src="/scripts/jquery-ui/jquery.ba-dotimeout.js"></script>
	<script src="/scripts/jquery-ui/ui/jquery.effects.core.js"></script>
	
	<!-- CKEditor -->
	<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>

	<script type="text/javascript" src="/scripts/custom/manage/welcome.js"></script>	
	<script type="text/javascript">
	$(document).ready(function() {
		 
		// Editor 오픈후 정보 로드
		fnAjaxWelcomeText();
		
		// 수정
		$("#id_btn_edit").click(function(e) {
			e.preventDefault();
			if (confirm("변경된 내용을 적용 하시겠습니까?")) {
				var oEditor = CKEDITOR.instances.editor1;
				$("#contents").val(oEditor.getData());
				
				$("#information").submit();
			}
		});
		
		// 취소
		$("#id_btn_cancel").click(function(e) {
			e.preventDefault();
			location.href = "/manage/welcome";
		});		
	});
	</script>
</head>
<body>
	<!-- Loading Bar 초기화 -->
	<div id="id_jquery_loading" title="화면 로딩중..."><center><img src="/img/ajax-loader.gif"></center></div>

	<h3>카페소개 정보 수정</h3>
	
	<textarea id="editor1" name="editor1" style="width:100%;height:200px;"></textarea>
	<script type="text/javascript">
	CKEDITOR.replace('editor1', {
		language: 'ko',
		//extraPlugins : 'uicolor',
		//uiColor: '#EE0000',
		//skin : 'v2',
		height: 400
	});
	</script>
		
	<form:form modelAttribute="information" methd="post">
		<input type="hidden" id="contents" name="contents" value="" />
	</form:form>
	<br>
	<br>
	
	<div style="text-align:center;">
		<a href="#" id="id_btn_edit" class="btn_big"><strong>수정하기</strong></a>
		<a href="#" id="id_btn_cancel" class="btn_big"><span>취소</span></a>
	</div>
</body>
</html>












